package com.woniuxy.collection.set;

import java.util.Date;

public class CarCard {
         private String num;
         private Date dbegin;
         private Date etime;
         private int money;
         
		/* (non-Javadoc)
		 * @see java.lang.Object#hashCode()
		 */
		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + ((dbegin == null) ? 0 : dbegin.hashCode());
			result = prime * result + ((num == null) ? 0 : num.hashCode());
			return result;
		}
		/* (non-Javadoc)
		 * @see java.lang.Object#equals(java.lang.Object)
		 */
		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			CarCard other = (CarCard) obj;
			if (dbegin == null) {
				if (other.dbegin != null)
					return false;
			} else if (!dbegin.equals(other.dbegin))
				return false;
			if (num == null) {
				if (other.num != null)
					return false;
			} else if (!num.equals(other.num))
				return false;
			return true;
		}
		/* (non-Javadoc)
		 * @see java.lang.Object#toString()
		 */
		@Override
		public String toString() {
			return "CarCard [num=" + num + ", dbegin=" + dbegin + ", etime=" + etime + ", money=" + money + "]";
		}
		public CarCard(String num, Date dbegin, Date etime, int money) {
			this.num = num;
			this.dbegin = dbegin;
			this.etime = etime;
			this.money = money;
		}
		/**
		 * @return the num
		 */
		public String getNum() {
			return num;
		}
		/**
		 * @param num the num to set
		 */
		public void setNum(String num) {
			this.num = num;
		}
		/**
		 * @return the dbegin
		 */
		public Date getDbegin() {
			return dbegin;
		}
		/**
		 * @param dbegin the dbegin to set
		 */
		public void setDbegin(Date dbegin) {
			this.dbegin = dbegin;
		}
		/**
		 * @return the etime
		 */
		public Date getEtime() {
			return etime;
		}
		/**
		 * @param etime the etime to set
		 */
		public void setEtime(Date etime) {
			this.etime = etime;
		}
		/**
		 * @return the money
		 */
		public int getMoney() {
			return money;
		}
		/**
		 * @param money the money to set
		 */
		public void setMoney(int money) {
			this.money = money;
		}
         
}
